home *** CD-ROM | disk | FTP | other *** search
- property myObjects
-
- on new me
- set myObjects to [:]
- return me
- end
-
- on turnOn me
- if myObjects = EMPTY then
- exit
- end if
- repeat with r in myObjects
- tell r
- activate(r)
- end tell
- end repeat
- end
-
- on turnOff me
- if myObjects = EMPTY then
- exit
- end if
- repeat with r in myObjects
- tell r
- deActivate(r)
- end tell
- end repeat
- end
-
- on addSprite me, theName, theSprite, theMember, theLength, theInterval
- set newObject to new(script "randomSpriteMan", theSprite, theMember, theLength, theInterval)
- setaProp(myObjects, theName, newObject)
- end
-
- on addSound me, theName, theChannel, theSound, theInterval
- set newObject to new(script "randomSoundMan", theChannel, theSound, theInterval)
- setaProp(myObjects, theName, newObject)
- end
-
- on killObject me, theName
- if getaProp(myObject, theName) > 0 then
- deActivate(getaProp(myObjects, theName))
- deleteProp(myObjects, theName)
- end if
- end
-
- on stepObject me
- if myObjects = EMPTY then
- exit
- end if
- repeat with r in myObjects
- tell r
- stepObject(r)
- end tell
- end repeat
- end
-